package com.hero.jobweb.service;

import java.util.ArrayList;
import java.util.List;

import com.hero.jobweb.entity.TbBasic;
import com.hero.jobweb.entity.TbCareerObjective;
import com.hero.jobweb.entity.TbEducation;
import com.hero.jobweb.entity.TbItskill;
import com.hero.jobweb.entity.TbLanguage;
import com.hero.jobweb.entity.TbOther;
import com.hero.jobweb.entity.TbProjectExperience;
import com.hero.jobweb.entity.TbResume;
import com.hero.jobweb.entity.TbWorkExperience;
import com.hero.web.service.IService;

/**
 * 简历业务类 业务逻辑的事务处理有Spring配置文件做管理 2011-6-8
 * 
 * @author Volcano
 * 
 */
public interface IResumeService extends IService {
	/**
	 * 保存简历信息
	 * 
	 * @param resume
	 */
	public void saveResume(TbResume resume);

	/**
	 * 修改简历
	 * 
	 * @param resume
	 */
	public void modifyResume(TbResume resume);

	/**
	 * 保存基本信息
	 * 
	 * @param basic
	 */
	public void saveBasic(TbBasic basic);

	/**
	 * 修改基本信息
	 * 
	 * @param basic
	 */
	public void modifyBasic(TbBasic basic);

	/**
	 * 保存教育经历
	 * 
	 * @param education
	 */
	public void saveEducation(TbEducation education);

	/**
	 * 修改教育经历
	 * 
	 * @param education
	 */
	public void modifyEducation(TbEducation education);

	/**
	 * 保存求职意向
	 * 
	 * @param careerObjective
	 */
	public void saveCareerObjective(TbCareerObjective careerObjective);

	/**
	 * 修改求职意向
	 * 
	 * @param careerObjective
	 */
	public void modifyCareerObjective(TbCareerObjective careerObjective);

	/**
	 * 保存自我评价
	 * 
	 * @param selfAppraise
	 */
	public void saveSelfAppraise(String selfAppraise);

	/**
	 * 修改自我评价
	 * 
	 * @param selfAppraise
	 */
	public void modifySelfAppraise(String selfAppraise);

	/**
	 * 保存工作经验
	 * 
	 * @param workExperience
	 */
	public void saveWorkExperience(TbWorkExperience workExperience);

	/**
	 * 修改工作经验
	 * 
	 * @param workExperience
	 */
	public void modifyWorkExperience(TbWorkExperience workExperience);

	/**
	 * 保存项目经验
	 * 
	 * @param projectExperience
	 */
	public void saveProjectExperience(TbProjectExperience projectExperience);

	/**
	 * 修改项目经验
	 * 
	 * @param projectExperience
	 */
	public void modifyProjectExperience(TbProjectExperience projectExperience);

	/**
	 * 保存语言
	 * 
	 * @param language
	 */
	public void saveLanguage(TbLanguage language);

	/**
	 * 修改语言
	 * 
	 * @param language
	 */
	public void modifyLanguage(TbLanguage language);

	/**
	 * 保存IT技能
	 * 
	 * @param itSkill
	 */
	public void saveItSkill(TbItskill itSkill);

	/**
	 * 修改IT技能
	 * 
	 * @param itSkill
	 */
	public void modifyItSkill(TbItskill itSkill);
	
	
	/**
	 * 完整简历
	 * 
	 * @author Volcano
	 * 
	 */
	public static class FullResume {
		private TbBasic tbBasic;
		private TbCareerObjective tbCareerObjective;
		private List<TbEducation> tbEducation;
		private List<TbItskill> tbItskill;
		private List<TbLanguage> tbLanguage;
		private List<TbProjectExperience> tbProjectExperience;
		private TbResume tbResume;
		private List<TbWorkExperience> tbWorkExperience;
		private String selfAppraise;
		private List<TbOther> tbOther;
		public List<TbOther> getTbOther() {
			return tbOther;
		}
		public void setTbOther(List<TbOther> tbOther) {
			this.tbOther = tbOther;
		}
		public TbBasic getTbBasic() {
			return tbBasic;
		}
		public void setTbBasic(TbBasic tbBasic) {
			this.tbBasic = tbBasic;
		}
		public TbCareerObjective getTbCareerObjective() {
			return tbCareerObjective;
		}
		public void setTbCareerObjective(TbCareerObjective tbCareerObjective) {
			this.tbCareerObjective = tbCareerObjective;
		}
		public List<TbEducation> getTbEducation() {
			return tbEducation;
		}
		public void setTbEducation(List<TbEducation> tbEducation) {
			this.tbEducation = tbEducation;
		}
		public List<TbItskill> getTbItskill() {
			return tbItskill;
		}
		public void setTbItskill(List<TbItskill> tbItskill) {
			this.tbItskill = tbItskill;
		}
		public List<TbLanguage> getTbLanguage() {
			return tbLanguage;
		}
		public void setTbLanguage(List<TbLanguage> tbLanguage) {
			this.tbLanguage = tbLanguage;
		}
		public List<TbProjectExperience> getTbProjectExperience() {
			return tbProjectExperience;
		}
		public void setTbProjectExperience(List<TbProjectExperience> tbProjectExperience) {
			this.tbProjectExperience = tbProjectExperience;
		}
		public TbResume getTbResume() {
			return tbResume;
		}
		public void setTbResume(TbResume tbResume) {
			this.tbResume = tbResume;
		}
		public List<TbWorkExperience> getTbWorkExperience() {
			return tbWorkExperience;
		}
		public void setTbWorkExperience(List<TbWorkExperience> tbWorkExperience) {
			this.tbWorkExperience = tbWorkExperience;
		}
		public String getSelfAppraise() {
			return selfAppraise;
		}
		public void setSelfAppraise(String selfAppraise) {
			this.selfAppraise = selfAppraise;
		}
		
		public void initTbEductionList(int size)
		{
			this.tbEducation=new ArrayList<TbEducation>();
			for(int i=0;i<size;i++)
			{
				this.tbEducation.add(new TbEducation());
			}
		}
		public void initTbWorkExperienceList(int size)
		{
			this.tbWorkExperience=new ArrayList<TbWorkExperience>();
			for(int i=0;i<size;i++)
			{
				this.tbWorkExperience.add(new TbWorkExperience());
			}
		}
	};
	

	/**
	 * 查询简历列表
	 * 
	 * @return
	 */
	public List<TbResume> queryResumeList(TbResume tbResume);

	/**
	 * 根据简历Id查询完整简历
	 * 
	 * @param tbUser
	 * @return
	 */
	public FullResume queryFullResumeByResumeId(TbResume tbResume);
	
	
	/**
	 * 对简历执行任何操作之前，必须检测简历基本信息是否存在
	 * 如果不存在,很有可能是SQL注入BUG,如果不做严谨限制，任何一个登陆用户都可以修改
	 * 任意简历。
	 * @param resume
	 * @return
	 */
	public TbResume existsResume(TbResume resume);
	/**
	 *  保存标准简历
	 * @param fullResume
	 * @return
	 */
	public FullResume saveStandardResume(FullResume fullResume);
	
	/**
	 * 查询基础信息
	 * @param basic
	 * @return
	 */
	public TbBasic queryBasic(TbBasic basic);

}
